<?php 
include('../Connections/KRAPPERCON.php');
include('../Connections/Accesos.php');
?>
<div>
<input type="button" onClick="searchFactCom()" value="Buscar"/>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>Fecha de Creacion :</td>
    <td colspan="3">
      <input type="text" class="tcal" name="t_cf_cini"  id="t_cf_cini"> 
      a 
      <input type="text" name="t_cf_cfin" class="tcal" id="t_cf_cfin">
    </td>
  </tr>
  <tr>
    <td>Fecha de Factura :</td>
    <td colspan="3"><input type="text"  class="tcal" name="t_cf_dini" id="t_cf_dini">
a
  <input type="text" name="t_cf_dfin"  class="tcal" id="t_cf_dfin"></td>
  </tr>
  <tr>
    <td>Fecha de Vencimiento :</td>
    <td colspan="3"><input type="text"  class="tcal" name="t_cf_vini" id="t_cf_vini">
a
  <input type="text" name="t_cf_vfin"  class="tcal" id="t_cf_vfin"></td>
  </tr>
  <tr>
    <td>Proveedor :</td>
    <td>
      <select name="cbo_cf_prov" id="cbo_cf_prov">
      <option value="0">Todos</option>
      <?php 
      	  include ('../Query_Min/getProveedores.php');
		  ?>
      </select>
    </td>
    <td>Estado :</td>
    <td>
      <select name="cbo_cf_est" id="cbo_cf_est">
      <option value="">Todos</option>
      <option value="0">Pendiente Pago</option>
      <option value="1">Anulado</option>
      <option value="2">Anulacion</option>
      <option value="3">Pagados</option>
      </select>
    </td>
  </tr>
  <tr>
    <td>Referencia :</td>
    <td>
      <input type="text" name="t_cf_ref" id="t_cf_ref">
    </td>
    <td>Local Recepcion :</td>
    <td>
      <select name="cbo_cf_local" id="cbo_cf_local">
      <option value="0">Todos</option>
      <?php
	  	  include ('../Query_Min/getCentros.php');
	  ?>
      </select>
    </td>
  </tr>
  <tr>
    <td>Usuario :</td>
    <td>
      <input type="text" name="t_cf_usr" id="t_cf_usr">
    </td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" id="d_resfac"></td>
  </tr>
</table>
<script type="text/javascript">
function searchFactCom(){
	$('#d_resfac').loadx('Consultas/Opers/queryFactCom.php',
	{
	oper : 'view',
	t_c_ini : GEBI('t_cf_cini').value,
	t_c_fin : GEBI('t_cf_cfin').value,
	t_d_ini : GEBI('t_cf_dini').value,
	t_d_fin : GEBI('t_cf_dfin').value,
	t_v_ini : GEBI('t_cf_vini').value,
	t_v_fin : GEBI('t_cf_vfin').value,
	t_c_prov : GEBI('cbo_cf_prov').value,
	t_c_ref : GEBI('t_cf_ref').value,
	t_c_sts : GEBI('cbo_cf_est').value,
	t_c_usr : GEBI('t_cf_usr').value,
	t_c_loc : GEBI('cbo_cf_local').value
	});
}
</script>
